The Circular Drift Diffusion Model

The circular drift-diffusion model (CDDM) is a stochastic sequential sampling model that describes choices and response times observed in tasks with a circular decision space (i.e., a bounded continuum; Smith, 2016).

Like many other accumulator models, the assumes that information gets accumulated over time, moving from a starting point located at the origin of a circle representing the decision space, towards its circumference. Responses made by participants are expressed in radians.

The CDDM considers four parameters.

  1. The nondecision time \(\tau\)

  2. The response criterion (i.e., the radius of the circle) \(\eta\).

  3. A douplet of parameters related to the information provided by the stimulus: \(\mu_x\) and \(\mu_y\) OR \(\theta\) and \(\delta\).

Below we have a graphical representation of the CDDM (non-decision time is not included)

Algorithm 1: Random walk emulator

# 2: Define some parameter values and sample size ~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# Some parameter values
par <- list("drift" = 1, 
            "theta" = pi,
            "tzero" = 0.1,
            "boundary" = 7)
n <- 5000 # No. samples
source("./code/cddm/sim_randomWalk.R")
X.RW <- sample.RW.cddm(n,par)

The execution of this first algorithm took approximately 32.2845 seconds.

Algorithm 2: Metropolis-Hasting MCMC

max.RT <- max(X.RW$bivariate.data[,2])
source("./code/cddm/sim_MCMC.R")
X.MCMC <- sample.MCMC.cddm(n,par,max.RT,plot=TRUE)

The execution of this second algorithm took approximately 32.2845 seconds.

Comparison

Choices

par(pty="m")          
par(mfrow=c(2,1),mar = c(3, 3, 3, 0)) 
# Choices
hist(X.RW$bivariate.data[,1], main="Choices on Random Walk",
     xlim=c(0,2*pi), col="goldenrod4")
hist(X.MCMC[,1], main= "Choices on MCMC", xlim=c(0,2*pi), col="cyan4")

Response Times

par(pty="m")          
par(mfrow=c(2,1),mar = c(3, 3, 3, 0)) 
# Response Times
hist(X.RW$bivariate.data[,2], main = "RT on Random Walk", col="goldenrod3")
hist(X.MCMC[,2], main = "RT on MCMC", col="cyan4")

Circular representation

source("./code/cddm/plottingFunctions.R")

par(pty="m")          
par(mfrow=c(1,2),mar = c(3, 3, 3, 0)) 
# Decisions on a circle
plot.CDDM(X.RW, par, choice.col.RGB = c(0.4,.9,.3))

plot.CDDM(X.MCMC, par, choice.col.RGB = c(0.15,.29,.80))

Code